# coding: UTF-8
# Filename : branch_data_model.py
# Company : imedia
# Author : rose
# -*-coding:utf-8 -*-


'''

def get_star_row(size, pagenum):
    if size == 0 or pagenum == 0: return 0
    return size*(int(pagenum) -1)

a = '2'
b = '5'
c = int(a)
d = int(b)
print get_star_row(c,d)

import re
#验证是否为数字
def is_num(str):
    return regex('^\d+$',str)
#做正则验证
def regex(regex, str):
    pattern = re.compile(regex)  
    match = pattern.match(str.strip())  
    if match:  
        return True
    else:
        return False

    
print is_num('  123  ')
'''

str = 'abcdefghaha123'
#去最后八位数
print str[0:2]

a = ['aa', 'bb']
b = ['cc', 'dd']
c = ('aa', 'bb')
d = ('cc', 'dd')
print a+b
print d

import os
str = os.popen("dir").read()
a = str.split("\n")
for b in a:
   print b



